home *** CD-ROM | disk | FTP | other *** search
- /* strlen.c From TC Bible page 286 Use strlen to find the length of a string
- in bytes, not counting the terminating null character */
-
- #include <stdio.h>
- #include <string.h>
- main()
- {
- size_t len;
- char buf[80];
- printf("Enter a string: ");
- gets(buf);
- len = strlen(buf);
- printf("The length of the string is: %u\n", len);
-
- }